<div id="left_panel">
    <div class="title">+ Register Form</div>
    <div class="body_content">
        <div class="contact_form">
            
            <label>Membership type</label>
            <input type="radio" onclick="Commercial()" checked="1"  name="membership" value="Commercial" />Commercial 
            <input type="radio" onclick="Personal()" name="membership" value="Personal" />Personal<br /><br />
            <div class="Commercial">
                <form action="{{base_url("sys/excution/nothing")}}" 
                name="frmCommercial"
                target="integration_asynchronous"
                onsubmit="regCommercial()"
                method="post">
                    <label>Company Name</label><br />
                    <input type="text" id="cname" name="cname" class="text" title=""/><br />
                    <label>VAT Registration No</label><br />
                    <input type="text" id="cvat" name="cvat" class="text" title=""/><br />
                    <label>Official Address</label><br />
                    <input type="text" id="caddress" name="caddress" class="text" title=""/><br />
                    <label>Industry</label><br />
                    <input type="text" id="cindustry" name="cindustry" class="text" title=""/><br />
                    <label>Website</label><br />
                    <input type="text" id="cwebsite" name="cwebsite" class="text" title=""/><br />
                    <label>Phone</label><br />
                    <input type="text" id="cphone" name="cphone" class="text" title=""/><br />
                    <label>Email</label><br />
                    <input type="text" id="cemail" name="cemail" class="text" title=""/><br />
                    <label>Password</label><br />
                    <input type="password" id="cpassword" name="cpassword" class="text" title=""/><br />
                    <input type="image" 
                           onclick="document.frmCommercial.submit()"
                           name="imageField" id="imageField" class="button" 
                           src="{{base_url()}}PushClimb/images/register_button.png" />
                </form>
            </div>
            <div class="Personal" style="display: none">
                <form action="{{base_url("sys/excution/nothing")}}" 
                name="frmPersonal"
                target="integration_asynchronous"
                onsubmit="regPersonal()"
                method="post">
                    <label>Name</label><br />
                    <input type="text" id="pname" name="pname" class="text" title=""/><br />
                    <label>Gender</label><br />
                    <input type="text" id="pgender" name="pgender" class="text" title=""/><br />
                    <label>Age</label><br />
                    <input type="number" id="page" name="page" class="text" title=""/><br />
                    <label>Level</label><br />
                    <input type="text" id="plevel" name="plevel" class="text" title=""/><br />
                    <label>Address</label><br />
                    <input type="text" id="paddress" name="paddress" class="text" title=""/><br />
                    <label>Phone</label><br />
                    <input type="text" id="pphone" name="pphone" class="text" title=""/><br />
                    <label>Email</label><br />
                    <input type="text" id="pemail" name="pemail" class="text" title=""/><br />
                    <label>Password</label><br />
                    <input type="password" id="ppassword" name="ppassword" class="text" title=""/><br />
                    <input type="image"
                           onclick="document.frmPersonal.submit()"
                           name="imageField" id="imageField" class="button" src="{{base_url()}}PushClimb/images/register_button.png" />
                    
                </form>
            </div>
            <div class="clear"></div>
        </div>
    </div>
</div>
                <script>
                    function Commercial(){
                        $(".Personal").hide();
                        $(".Commercial").show();
                    }
                    function Personal(){
                        $(".Commercial").hide();
                        $(".Personal").show();
                    }
                    function regCommercial(){
                        if(isrunning)return;
                        var url,data;
                        url="{{base_url()}}login/regCommercial";
//                        if(!_FcheckLike($("#cpassword").val(), $("#crepassword").val())){
//                            $("#crepassword").focus();
//                        }
                        data={
                            CompanyName :   $("#cname").val(),
                            VATNo       :   $("#cvat").val(),
                            Address     :   $("#caddress").val(),
                            Industry    :   $("#cindustry").val(),
                            Website     :   $("#cwebsite").val(),
                            Phone       :   $("#cphone").val(),
                            Email       :   $("#cemail").val(),
                            Password    :   $("#cpassword").val()
                        }
                        isrunning=true;
                        debugAjax(url,data,function(result){
                            isrunning=false;
                            if(result.code>=0){
                                document.frmCommercial.reset();
                                ShowNoticeDialogMessage(result.msg);
                            }else{
                                ShowNoticeDialogMessage(result.msg);
                            }
                        });
                    }
                    function regPersonal(){
                        if(isrunning)return;
                        var url,data;
                        url="{{base_url()}}login/regPersonal";

                        data={
                            Name    :   $("#pname").val(),
                            Gender         :   $("#pgender").val(),
                            Age        :   $("#page").val(),
                            Level    :   $("#plevel").val(),
                            Address       :   $("#paddress").val(),
                            Phone       :   $("#pphone").val(),
                            Email         :   $("#pemail").val(),
                            Password    :   $("#ppassword").val()
                        }
                        isrunning=true;
                        debugAjax(url,data,function(result){
                            isrunning=false;
                            if(result.code>=0){
                                document.frmPersonal.reset();
                                ShowNoticeDialogMessage(result.msg);
                            }else{
                                ShowNoticeDialogMessage(result.msg);
                            }
                        });
                    }
                </script>